<!DOCTYPE html>
<html lang="en">
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>oscillator</title>
  <link rel="stylesheet" href="./style.css" type="text/css" />
  <body>
    <div class="wrapper"></div>
    <script>
      const amount = 200;
      const wrapper = document.querySelector(".wrapper");
      wrapper.style.setProperty("--amount", amount);
      const frag = document.createDocumentFragment();
      for (let i = 0; i < amount; i++) {
        const div = document.createElement("div");
        div.style.animationDelay = `${(i + 1) * 0.01}s`;
        div.classList.add("block");
        frag.appendChild(div);
      }
      wrapper.appendChild(frag);
    </script>
  </body>
</html>
